home *** CD-ROM | disk | FTP | other *** search
- #ifndef map96_h
- #define map96_h
-
- /*
- * Map96s are things that map96 one integer onto another. There are
- * create, insert, lookup, and destroy operations.
- */
-
- typedef struct TE96 {
- int key0, key1, key2; /* the key for this entry */
- int value; /* what we want */
- } TE96, *TE96Ptr;
-
- typedef struct Map96Record {
- TE96Ptr table;
- int maxIndex, maxCount, count;
- } Map96Record, *Map96;
-
- #define NIL ((unsigned)0x80000000)
-
- Map96 Map96_Create();
-
- Map96 Map96_CreateSized(/* count */);
- /* int count */
-
- void Map96_Clear(/* map96 */);
- /* Map96 map96; */
-
- void Map96_Insert(/* map96, key0, key1, key2, value */);
- /* Map96 map96; int key0, key1, key2, value; */
-
- int Map96_Lookup(/* map96, key0, key1, key2 */);
- /* Map96 map96; int key0, key1, key2; */
-
- int Map96_InverseLookup(/* map96, value */);
- /* Map96 map96; int value; */
-
- void Map96_Delete(/* map96, key0, key1, key2 */);
- /* Map96 map96; int key0, key1, key2; */
-
- void Map96_Destroy(/* map96 */);
- /* Map96 map96; */
-
- void Map96_Print(/* map96 */);
- /* Map96 map96; */
-
- #define Map96_For(m, key0, key1, key2, value) \
- { \
- int zzIndexzz = 0; \
- while (Map96_FindNext((m), &zzIndexzz, (int *)&(key0), (int *)&(key1), (int *)&(key2), (int *)&value)) {
- #define Map96_Next \
- } \
- }
-
- #define Map96_Count(m) ((m)->count)
-
- #endif
-